package com.caiyi.financial.nirvana.sms.gateway.sgip.message.body;

import com.caiyi.financial.nirvana.sms.gateway.sgip.message.SGIPBody;
import io.netty.buffer.ByteBuf;

public class SGIPDeliverResp extends SGIPBody {

    private int result;

    @Override
    public int encode(ByteBuf buffer) {
        int length = 0;

        buffer.writeByte(this.result);
        length += 1;
        //8位保留位
        buffer.writeZero(8);
        length += 8;

        return length;
    }

    @Override
    public SGIPBody decode(ByteBuf buffer) {
        throw new UnsupportedOperationException("not need");
    }

    /**
     * @return the result
     */
    public int getResult() {
        return result;
    }

    /**
     * @param result the result to set
     */
    public void setResult(int result) {
        this.result = result;
    }

}
